package ch01.com.ktjy.dao.cvs_db;

import ch01.StorageRecord;
import ch01.Supplier;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface StorageRecordMapper {
    /**
     *
     * @param goodsName 商品名称
     * @param supplierId 供货商ID
     * @param payStatus 支付状态
     * @return
     */
    public List<StorageRecord> getStorageRecordParams(@Param("goodsName")String goodsName, @Param("supplierId")Integer supplierId, @Param("payStatus")Integer payStatus);

    /**
     *  查询入库记录
     * @param storageRecord
     * @return
     */
    public List<StorageRecord> getStorageRecordListWithSupName(StorageRecord storageRecord);

    /**
     * 嵌套查询
     * @param storageRecordMap
     * @return
     */
    public List<StorageRecord> getStorageRecordListByMap(Map<String,Object>storageRecordMap);

    /**
     * 按Id查
     * @param supplierId
     * @return
     */
    public List<StorageRecord> getStorageRecordAndSupplierBySupplierId(@Param("supplierId")Integer supplierId);

    /**
     * 使用if标签查入库记录列表
     * @return
     */
    public List<StorageRecord>StorageRecordIf(@Param("supplierId") Integer supplierId,
                                              @Param("payStatus") Integer payStatus,
                                              @Param("goodsName") String goodsName);

    /**
     * 使用foreach数组
     * @param supplierId
     * @return
     */
    public List<StorageRecord>StorageRecordForeachArray(Integer [] supplierId);

    /**
     * 使用foreach集合
     * @param supplierId
     * @return
     */
    public List<StorageRecord>StorageRecordForeachList(List<Integer> supplierId);

    public List<StorageRecord>StorageRecordForeachMap(Map<String,Object> supplierId);
}
